// src/router/index.js
import { createRouter, createWebHistory } from 'vue-router'
import Home from './components/Home.vue'
import RestaurantDetail from './components/RestaurantDetail.vue'
import UserInfo from './components/UserInfo.vue'

const routes = [
    { path: '/', component: Home, name: 'Home' },
    { path: '/restaurant', component: RestaurantDetail, name: 'Restaurant' }, // 或者 /restaurant/:id 如果需要参数
    { path: '/user', component: UserInfo, name: 'UserInfo' }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router